package xubo.wangcaifeng.love

import redis.clients.jedis.{Jedis, JedisPool, JedisPoolConfig}


object JedisConnectionPool {
  //建一个jedis线程池，里面的参数主机名，端口号，还可以更好点就是可以限制线程的数量
  private val config = new JedisPoolConfig()
  //最大jedis个数
  private val pool = new JedisPool("mini1",6379)
  def getConnection(): Jedis = {
    pool.getResource
  }


}
